Skip to content

feat(mcp): Add job_type filtering support to list_cloud_sync_jobs#974

Merged
Aaron ("AJ") Steers (aaronsteers) merged 2 commits into
mainfrom
devin/1770076982-add-job-type-filtering
Feb 3, 2026
Merged

feat(mcp): Add job_type filtering support to list_cloud_sync_jobs#974
Aaron ("AJ") Steers (aaronsteers) merged 2 commits into
mainfrom
devin/1770076982-add-job-type-filtering

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Feb 3, 2026

Copy link
Copy Markdown
Member

Summary

Adds job_type filtering support to the list_cloud_sync_jobs MCP tool and its underlying API functions. This allows users to filter jobs by type: sync, reset, refresh, or clear.

Previously, the Airbyte API defaulted to returning only sync and reset jobs when no job_type was specified, which prevented users from discovering stuck refresh or clear jobs via the API.

Changes:

  • api_util.get_job_logs(): Added job_type parameter with string-to-enum conversion
  • CloudConnection.get_previous_sync_logs(): Added job_type parameter pass-through
  • list_cloud_sync_jobs MCP tool: Added job_type parameter with descriptive help text

Closes #973

Review & Testing Checklist for Human

  • Verify the job_type parameter correctly filters jobs when tested against a real Airbyte Cloud connection (especially for refresh and clear job types)
  • Confirm that passing an invalid job_type value raises an appropriate error (currently relies on models.JobTypeEnum constructor to raise ValueError)
  • Test that omitting job_type maintains backward compatibility (should return only sync/reset jobs per API default)

Recommended test plan: Use the MCP tool test task to verify the parameter is correctly exposed:

poe mcp-tool-test list_cloud_sync_jobs '{"connection_id": "<test_connection_id>", "job_type": "refresh"}'

Notes


Open with Devin

Summary by CodeRabbit

  • New Features
    • Added optional job-type filtering for viewing job logs and connection sync job history. Users can filter by 'sync', 'reset', 'refresh', or 'clear'. When unset, listings default to showing sync and reset jobs for convenience.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

This adds a job_type parameter to the list_cloud_sync_jobs MCP tool and
its underlying API functions, allowing users to filter jobs by type:
'sync', 'reset', 'refresh', or 'clear'.

Previously, the API defaulted to returning only sync and reset jobs,
which prevented users from discovering stuck refresh or clear jobs.

Changes:
- api_util.get_job_logs(): Added job_type parameter
- CloudConnection.get_previous_sync_logs(): Added job_type parameter
- list_cloud_sync_jobs MCP tool: Added job_type parameter

Closes #973

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@octavia-bot octavia-bot Bot marked this pull request as draft February 3, 2026 00:06
@octavia-bot

octavia-bot Bot commented Feb 3, 2026

Copy link
Copy Markdown

Note

📝 PR Converted to Draft

More info...

Thank you for creating this PR. As a policy to protect our engineers' time, Airbyte requires all PRs to be created first in draft status. Your PR has been automatically converted to draft status in respect for this policy.

As soon as your PR is ready for formal review, you can proceed to convert the PR to "ready for review" status by clicking the "Ready for review" button at the bottom of the PR page.

To skip draft status in future PRs, please include [ready] in your PR title or add the skip-draft-status label when creating your PR.

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1770076982-add-job-type-filtering' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1770076982-add-job-type-filtering'

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /fix-pr - Fixes most formatting and linting issues
  • /uv-lock - Updates uv.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI
📚 Show Repo Guidance

Helpful Resources

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

Comment thread airbyte/_util/api_util.py Outdated

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional flags.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds an optional job_type parameter (enum) that flows from the MCP tool through CloudConnection into the low-level API utility and is forwarded to the Airbyte jobs list API to filter returned job types.

Changes

Cohort / File(s) Summary
API Utility Layer
airbyte/_util/api_util.py
Added `job_type: models.JobTypeEnum
Cloud Connection Layer
airbyte/cloud/connections.py
Added `job_type: JobTypeEnum
MCP Tool Layer
airbyte/mcp/cloud.py
Added `job_type: JobTypeEnum

Sequence Diagram(s)

sequenceDiagram
    participant User as "User (MCP)"
    participant MCP as "list_cloud_sync_jobs (MCP)" 
    participant Conn as "CloudConnection.get_previous_sync_logs"
    participant Util as "api_util.get_job_logs"
    participant API as "Airbyte API (jobs.list_jobs)"

    User->>MCP: call list_cloud_sync_jobs(connection_id, job_type?)
    MCP->>Conn: get_previous_sync_logs(connection_id, job_type?)
    Conn->>Util: get_job_logs(connection_id, ..., job_type?)
    Util->>API: jobs.list_jobs(ListJobsRequest{..., jobType=job_type})
    API-->>Util: JobResponse list
    Util-->>Conn: filtered JobResponse list
    Conn-->>MCP: SyncJobListResult
    MCP-->>User: result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Would you consider renaming the MCP tool to something like list_cloud_jobs now that it can return non-sync types (e.g., refresh, clear)? wdyt?

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding job_type filtering support to the list_cloud_sync_jobs MCP tool.
Linked Issues check ✅ Passed The PR fully implements all coding requirements from issue #973: job_type parameter added to api_util.get_job_logs(), CloudConnection.get_previous_sync_logs(), and list_cloud_sync_jobs with proper documentation and enum typing.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #973 objectives; no out-of-scope modifications detected in the three modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1770076982-add-job-type-filtering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@aaronsteers Aaron ("AJ") Steers (aaronsteers) changed the title feat(mcp): Add job_type filtering support to list_cloud_sync_jobs feat(mcp): Add job_type filtering support to list_cloud_sync_jobs Feb 3, 2026
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

PyTest Results (Fast Tests Only, No Creds)

326 tests  ±0   326 ✅ ±0   5m 35s ⏱️ +4s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 53b7f60. ± Comparison against base commit 8418815.

♻️ This comment has been updated with latest results.

Comment thread airbyte/cloud/connections.py
@aaronsteers Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review February 3, 2026 00:15
@aaronsteers

Copy link
Copy Markdown
Member Author

Devin, this is set to auto-merge and it will release in v0.37.0. Please get a PR ready to bump the PyAirbyte dependency in coral-agents for its Coral MCP usage. You won't be able to lock the file until this merges and released, but you can create in advance with the constraint bump.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Done! I've created the coral-agents PR to bump the PyAirbyte dependency: https://github.com/airbytehq/coral-agents/pull/56

The constraint is updated to >=0.37.0. The lock file will need to be updated once v0.37.0 is published to PyPI.

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

PyTest Results (Full)

396 tests  ±0   379 ✅ ±0   23m 19s ⏱️ - 1m 38s
  1 suites ±0    17 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 53b7f60. ± Comparison against base commit 8418815.

@aaronsteers Aaron ("AJ") Steers (aaronsteers) merged commit 2ea8876 into main Feb 3, 2026
23 checks passed
@aaronsteers Aaron ("AJ") Steers (aaronsteers) deleted the devin/1770076982-add-job-type-filtering branch February 3, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add job_type filtering support to list_cloud_sync_jobs MCP tool and underlying API

1 participant